package com.manage.sysuser.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.manage.base.dao.impl.BaseDaoImpl;
import com.manage.sysuser.dao.ISysUserDao;
import com.manage.sysuser.model.RoleUserInfo;
import com.manage.sysuser.model.SysUser;

@Repository("sysUserDao")
public class SysUserDaoImpl extends BaseDaoImpl<SysUser> implements
    ISysUserDao {

	
	@Override
	public List<SysUser> selectList(SysUser sysUser) {
		  return getSqlSession().selectList(
		            "SysUserMapper.list", sysUser);
	}
	
	@Override
	public SysUser selectOne(SysUser sysUser) {
		  return getSqlSession().selectOne(
		            "SysUserMapper.selectOne", sysUser);
	}
	
	@Override
	public int op(SysUser sysUser) {
		 return getSqlSession().update(
	            "SysUserMapper.op", sysUser);
	}
	@Override
	public int add(SysUser sysUser) {
		  return getSqlSession().update(
	            "SysUserMapper.add", sysUser);
	}
	
	@Override
	public int addRoleUser(RoleUserInfo roleUserInfo) {
		  return getSqlSession().update(
	            "SysUserMapper.addRoleUser", roleUserInfo);
	}
	
	
	
	@Override
	public int update(SysUser sysUser) {
		return getSqlSession().update(
	            "SysUserMapper.update", sysUser);		
	}
	@Override
	public int delete(SysUser sysUser) {
		return getSqlSession().delete(
	            "SysUserMapper.delete", sysUser);		
	}
	
	@Override
	public int selectTotalCount(SysUser sysUser) {
		return getSqlSession().selectOne("SysUserMapper.selectTotalCount",sysUser);
	}
	
}
